Integrand size = 28, antiderivative size = 63 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {C \text {arctanh}(\sin (c+d x))}{2 d}+\frac {B \tan (c+d x)}{d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 d}+\frac {B \tan ^3(c+d x)}{3 d} \]
1/2*C*arctanh(sin(d*x+c))/d+B*tan(d*x+c)/d+1/2*C*sec(d*x+c)*tan(d*x+c)/d+1 /3*B*tan(d*x+c)^3/d
Time = 0.16 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.95 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {C \text {arctanh}(\sin (c+d x))}{2 d}+\frac {C \sec (c+d x) \tan (c+d x)}{2 d}+\frac {B \left (\tan (c+d x)+\frac {1}{3} \tan ^3(c+d x)\right )}{d} \]
(C*ArcTanh[Sin[c + d*x]])/(2*d) + (C*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (B *(Tan[c + d*x] + Tan[c + d*x]^3/3))/d
Time = 0.46 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.02, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3042, 3489, 3042, 3227, 3042, 4254, 2009, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^5(c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^5}dx\) |
\(\Big \downarrow \) 3489 |
\(\displaystyle \int \sec ^4(c+d x) (B+C \cos (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B+C \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle B \int \sec ^4(c+d x)dx+C \int \sec ^3(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle B \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx+C \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle C \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {B \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle C \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {B \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle C \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {B \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle C \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {B \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle C \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {B \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\) |
C*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)) - (B*( -Tan[c + d*x] - Tan[c + d*x]^3/3))/d
3.3.24.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b Int[(b*Sin[e + f* x])^(m + 1)*(B + C*Sin[e + f*x]), x], x] /; FreeQ[{b, e, f, B, C, m}, x]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 4.54 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.95
method | result | size |
derivativedivides | \(\frac {C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(60\) |
default | \(\frac {C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-B \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}\) | \(60\) |
parts | \(-\frac {B \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(62\) |
risch | \(-\frac {i \left (3 C \,{\mathrm e}^{5 i \left (d x +c \right )}-12 B \,{\mathrm e}^{2 i \left (d x +c \right )}-3 C \,{\mathrm e}^{i \left (d x +c \right )}-4 B \right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {C \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {C \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) | \(99\) |
parallelrisch | \(\frac {-9 C \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+9 C \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+6 \sin \left (2 d x +2 c \right ) C +4 B \left (\sin \left (3 d x +3 c \right )+3 \sin \left (d x +c \right )\right )}{6 d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(126\) |
norman | \(\frac {\frac {\left (2 B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 \left (2 B -3 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {\left (2 B -3 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {\left (2 B -C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (2 B +3 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 \left (2 B +3 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(203\) |
1/d*(C*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))-B*(-2/3-1 /3*sec(d*x+c)^2)*tan(d*x+c))
Time = 0.26 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.40 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {3 \, C \cos \left (d x + c\right )^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, C \cos \left (d x + c\right )^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (4 \, B \cos \left (d x + c\right )^{2} + 3 \, C \cos \left (d x + c\right ) + 2 \, B\right )} \sin \left (d x + c\right )}{12 \, d \cos \left (d x + c\right )^{3}} \]
1/12*(3*C*cos(d*x + c)^3*log(sin(d*x + c) + 1) - 3*C*cos(d*x + c)^3*log(-s in(d*x + c) + 1) + 2*(4*B*cos(d*x + c)^2 + 3*C*cos(d*x + c) + 2*B)*sin(d*x + c))/(d*cos(d*x + c)^3)
\[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\int \left (B + C \cos {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sec ^{5}{\left (c + d x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.11 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {4 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B - 3 \, C {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{12 \, d} \]
1/12*(4*(tan(d*x + c)^3 + 3*tan(d*x + c))*B - 3*C*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (57) = 114\).
Time = 0.30 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.94 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {3 \, C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, C \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (6 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 4 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{6 \, d} \]
1/6*(3*C*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*C*log(abs(tan(1/2*d*x + 1/ 2*c) - 1)) - 2*(6*B*tan(1/2*d*x + 1/2*c)^5 - 3*C*tan(1/2*d*x + 1/2*c)^5 - 4*B*tan(1/2*d*x + 1/2*c)^3 + 6*B*tan(1/2*d*x + 1/2*c) + 3*C*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^3)/d
Time = 3.08 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.76 \[ \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {C\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {\left (2\,B-C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {4\,B\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\left (2\,B+C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]